package com.lx.patterns.flyweight;

/**
 * @ClassName Client
 * @Description: //客户端类
 * @Author: 落雪
 * @CreateDate: 2025/1/26 21:33
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/1/26 21:33
 * @UpdateRemark:
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        ShapeFactory factory = ShapeFactory.instance;

        AbstractBox oBox = factory.getShape("O");
        oBox.display("red");

        AbstractBox lBox = factory.getShape("L");
        lBox.display("red");

        AbstractBox iBox = factory.getShape("I");
        iBox.display("red");

    }
}
